#include "thread.h"
#include "timer.h"
#include "openglRenderer.h"
#include "renderOptions.h"

class RenderManager: public Thread {
public:
	RenderManager();
#ifdef _WINDOWS
	bool setup(HWND hwnd, RenderOptions renderOptions);
#endif
	void reshapeWindow(int x, int y, int width, int height);
	void join();

	RenderOptions renderOptions;
	bool renderFrame;
	bool renderFrameDone;
private:
	void run();
	bool setupRenderer();
	bool renderView();

	int windowWidth;
	int windowHeight;

	/* Timers */
	Timer frameTimer;
	Timer renderViewTimer;

#ifdef _WINDOWS
	OpenGLRenderer opengl;
#endif
protected:
};